from models import db


class Admin(db.Model):
    __tablename__ = 'admin_info'
    __table_args__ = {'mysql_engine': 'InnoDB'}  # 支持事务操作和外键
    ID = db.Column(db.Integer, primary_key=True, nullable=False, autoincrement=True, unique=True)
    name = db.Column(db.String(50), nullable=False)
    password = db.Column(db.String(50))
    gender = db.Column(db.String(10))
    age = db.Column(db.Integer)
    phone = db.Column(db.String(50))
    email = db.Column(db.String(50))
    profile_photo = db.Column(db.String(200))
    description = db.Column(db.String(200))
    remove = db.Column(db.String(1))
